import 'dart:convert';

AuthNotice authNoticeFromJson(String str) => AuthNotice.fromJson(json.decode(str));

String authNoticeToJson(AuthNotice data) => json.encode(data.toJson());

class AuthNotice {
  int id;
  String title;
  String content;
  int typeId;
  DateTime createdAt;
  DateTime updatedAt;
  dynamic deletedAt;
  int status;
  DateTime endTime;
  int timeInt;

  AuthNotice({
    required this.id,
    required this.title,
    required this.content,
    required this.typeId,
    required this.createdAt,
    required this.updatedAt,
    required this.deletedAt,
    required this.status,
    required this.endTime,
    required this.timeInt,
  });

  factory AuthNotice.fromJson(Map<String, dynamic> json) => AuthNotice(
    id: json["id"],
    title: json["title"],
    content: json["content"],
    typeId: json["type_id"],
    createdAt: DateTime.parse(json["created_at"]),
    updatedAt: DateTime.parse(json["updated_at"]),
    deletedAt: json["deleted_at"],
    status: json["status"],
    endTime: DateTime.parse(json["end_time"]),
    timeInt: json["time_int"],
  );

  Map<String, dynamic> toJson() => {
    "id": id,
    "title": title,
    "content": content,
    "type_id": typeId,
    "created_at": createdAt.toIso8601String(),
    "updated_at": updatedAt.toIso8601String(),
    "deleted_at": deletedAt,
    "status": status,
    "end_time": endTime.toIso8601String(),
  };
}